# Create your views here.
#coding=utf-8
from django.conf.urls.defaults import *
from django.template import Context, loader
from django.http import HttpResponse

def sitehome(request):
    t = loader.get_template('syisou/index.html');
    

    c = Context();
    
    return HttpResponse(t.render(c))

def search(request):
    qtxt='搜一搜';
    
    if(request.has_key('q')):	
        qtxt = request.GET['q'];
        if qtxt==None:
            qtxt='搜一搜'

        unicode(qtxt,encoding='utf-8');
        print qtxt;

    t = loader.get_template('syisou/search.html');
    c=Context({'querytxt':qtxt});

    return HttpResponse(t.render(c));

def olove(request):
    t = loader.get_template('syisou/olove/index.html');
    c = Context({});
    
    return HttpResponse(t.render(c));

